package com.zhentao.controller;

import com.zhentao.model.dtos.ResponseResult;
import com.zhentao.model.wemedia.dto.ChannelDto;
import com.zhentao.service.WmChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
//@RequestMapping("/wemedia")
public class WemediaController {
    @Autowired
    private WmChannelService channelService;

    /**
     * 频道名称模糊分页查询
     * @param dto dto
     * @return
     */
    @PostMapping("/api/v1/channel/list")
    public ResponseResult findByNameAndPage(@RequestBody ChannelDto dto){
        return channelService.findByNameAndPage(dto);
    }
}
